public class Test {

        public static void main(String[] args) {
            MaxHeap maxHeap = new MaxHeap();
            maxHeap.add(3);
            maxHeap.add(5);
            maxHeap.add(10);
            maxHeap.add(2);
            maxHeap.add(7);

            System.out.println("堆顶元素（最大值）: " + maxHeap.findMax());
            System.out.println("取出堆顶元素后: " + maxHeap.extractMax());
            System.out.println("替换堆顶元素后取出原来的堆顶元素: " + maxHeap.replace(15));
        }

}
